
import os

from fastapi import APIRouter

from app_function.my_apps.config.config import load_config
from app_function.my_apps.projects import folder_name


def get_current_folder():
    current_dir_name = os.path.dirname(os.path.realpath(__file__))
    folder_name = current_dir_name.split(os.path.sep)[-1]
    return folder_name


dir_name = get_current_folder()
router = APIRouter(prefix=f"/manage_web/{dir_name}")
namespace = [folder_name + ' -> ' + dir_name]